There is a method, called secure computation, for obtaining computational results without decrypting encrypted numerical values (see Non-patent literature 1, for example). In the method in Non-patent literature 1, encryption is performed that distributes pieces of a numerical value are distributed among three secure computers and the three secure computers cooperate to perform a computation, thereby enabling the result of an addition, subtraction, addition by a constant, multiplication, multiplication by a constant, or logical operation (negation, AND, OR, or exclusive-OR) or data format conversion (integer, binary) to be held in such a manner that the result is distributed among the three secure computers without reconstructing the numerical value, that is, with the result being kept encrypted.
When pattern matching of character strings is performed, it is common practice to locate the positions in which the partial character strings included in a pattern appear in a text and determine whether the text matches the pattern on the basis of information about the positions.